import http from '.'

/**
 * 查询(分页)
 * @param {*} params
 */
export function getPackageList(params) {
  return http.get('api/v1/server-management/page?' + Form(params).queryString())
}

export function getAllServerList() {
  return http.get('api/v1/server-management/list')
}

/**
 * 删除
 * @param {*} rowId
 */
export function deletePackage(rowId) {
  return http.delete(`api/v1/server-management/delete/${rowId}`)
}

export function editPackage(data) {
  return http.post('api/v1/server-management/update', data)
}

export function addPackage(data) {
  return http.post('api/v1/server-management/add', data)
}

export function uploadFile(data) {
  return http({
    url: 'api/v1/updatePack/upload',
    method: 'post',
    data
  })
}
